package com.eco.fanliapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.fanliapp.entity.BannerPicture;
import com.eco.fanliapp.vo.BannerPictureVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * @ProjectName: fanliapp
 * @Package: com.eco.fanliapp.dao
 * @ClassName: BannerPictureMapper
 * @Author: LC
 * @Description: 图片信息
 * @Date: 2019/11/28 15:13
 * @Version: 4.2.2
 */
public interface BannerPictureMapper extends BaseMapper<BannerPicture>
{
    /**
     *  根据主键删除数据库的记录,banner_picture
     *
     * @param id
     */
    int deleteByPrimaryKey(Integer id);

    /**
     *  动态字段,写入数据库记录,banner_picture
     *
     * @param record
     */
    int insertSelective(BannerPicture record);

    /**
     *  根据指定主键获取一条数据库记录,banner_picture
     *
     * @param id
     */
    BannerPicture selectByPrimaryKey(Integer id);

    /**
     *  动态字段,根据主键来更新符合条件的数据库记录,banner_picture
     *
     * @param record
     */
    int updateByPrimaryKeySelective(BannerPicture record);

    /**
     * 查询图片-广告位、海报、首页图、启动页
     * @param bannerPicture
     * @return
     */
    List<BannerPicture> findAll(BannerPicture bannerPicture);

    List<BannerPicture> findAlls(BannerPicture bannerPicture);

	List<BannerPicture> selectByBannerPictureInvitationPoster(@Param(value = "companyId") Integer companyId);

	int deleteAll(Integer companyId);

    /**
     * 首页图
     * @return
     */
    List<BannerPicture> findHomePageBannerPicture();

    /**
     * 根据类型查询模块图片
     * @param picType
     * @param companyId
     * @return
     */
    List<BannerPictureVo> bannerModuleList(@Param("picType") Integer picType, @Param("companyId")Integer companyId);
}